﻿namespace WebOptimizer.Net.Services.V1
{
	public sealed partial class SourceCollection : global::Sidvall.Data.ServiceDataRowCollection<global::WebOptimizer.Net.Services.V1.Source>
	{
		#region Public Members

		#region SetDataRowState

		public void SetDataRowState(Sidvall.Data.DataRowState dataRowState)
		{
			foreach (var item in this)
				item.DataRowContext.DataRowState = dataRowState;
		}

		#endregion
		#region Copy

		public SourceCollection Copy()
		{
			return global::WebOptimizer.SystemContext.Current.EntityFacade.SourceManager.Copy(this) as SourceCollection;
		}
		public SourceCollection Copy(Sidvall.Data.CopySettings settings)
		{
			return global::WebOptimizer.SystemContext.Current.EntityFacade.SourceManager.Copy(this, settings) as SourceCollection;
		}

		#endregion
		#region Import

		public void Import(System.Collections.Generic.IEnumerable<global::WebOptimizer.Data.ISource> items)
		{
			global::WebOptimizer.SystemContext.Current.EntityFacade.SourceManager.Import(this, items);
		}
		public void Import(System.Collections.Generic.IEnumerable<global::WebOptimizer.Data.ISource> items, Sidvall.Data.CopySettings settings)
		{
			global::WebOptimizer.SystemContext.Current.EntityFacade.SourceManager.Import(this, items, settings);
		}

		#endregion
		#region Validate

		public Sidvall.Data.BrokenRuleCollection Validate()
		{
			return global::WebOptimizer.SystemContext.Current.EntityFacade.SourceManager.Validate(this);
		}
		public Sidvall.Data.BrokenRuleCollection Validate(Sidvall.Data.ValidationSettings settings)
		{
			return global::WebOptimizer.SystemContext.Current.EntityFacade.SourceManager.Validate(this, settings);
		}

		#endregion

		#endregion
		#region Constructors

		public SourceCollection()
		{
		}

		#endregion
	}
}